/**
 * 应用程序路由
 */


// 引入路由表
import routes from './routes/index.js'
// 引入中间件
import middleware from './middleware/index.js'
// 引入控制器
import controller from './controller/index.js'
// 引入业务
import service from './service/index.js'
// 引入数据库表模型
import model from './model/index.js'


/**
 * 注册MVC架构
 */
export default async (server) => {
    server.middleware = middleware;
    server.controller = controller;
    server.service = service;
    server.model = model(server);
    routes(server)
}
